<div class="form">

<?php $form=$this->beginWidget('CActiveForm', array(
	'id'=>'package-form',
	'enableAjaxValidation'=>false,
)); 

?>
	<p class="note">Fields with <span class="required">*</span> are required.</p>

	<?php // echo $form->errorSummary($model); ?>       

	<div class="row">
		<?php echo $form->labelEx($model,'name'); ?>
		<?php echo $form->textField($model,'name',array('size'=>60,'maxlength'=>255)); ?>
		<?php echo $form->error($model,'name'); ?>
	</div>
	<div class="row">
		<?php echo $form->labelEx($model,'desc'); ?>
		<?php echo $form->textArea($model,'desc'); ?>
		<?php echo $form->error($model,'desc'); ?>
	</div>
        <?php if($subcates) : ?>
        <?php foreach ($subcates as $subcate): ?>
        <div class="row">
		<label for="RegistrationForm_full_name"><?php echo $subcate['name']; ?></label>
                <input size="60" maxlength="255" name="XML[<?php echo Package::convertVietNgu($subcate['name']) ?>]" id="XML_<?php echo Package::convertVietNgu($subcate['name']) ?>" type="text">                
	</div>
        <?php endforeach;?>
        <?php endif;?>
	<div class="row buttons">
		<?php echo CHtml::submitButton($model->isNewRecord ? 'Create' : 'Save'); ?>
	</div>

<?php $this->endWidget(); ?>

</div><!-- form -->